#include "cmd.hpp"


int main()
{
    
    //创建共享内存
    int key = getKey();
    //cout<<key<<endl;
    cout<<"key: "<<toHex(key)<<endl;
    int shmid = creatShm(key,size);
    cout<<"shmid: "<<toHex(shmid)<<endl;

    // 关联内存
    void *address = shmat(shmid, nullptr, 0);
    sleep(15);
    //进行通信写入数据


    //去关联
    shmdt(address);

    //删除共享内存
    delShm(shmid);

    return 0;
}